  @import "../../shared/modal.less";
@theme-color : #FF6D6C;
// modal button colors
button,
span {
  &.color-green {
    background-color: #1CAD42;
    color: #FFF;
  }
  &.color-red {
    background-color: #FF6D6C;
    color: #FFF;
    &.disabled,
    &[disabled="disabled"] {
      background-color: #F06E6E;
      cursor: default;
    }
  }
  &.color-white {
    color: #FF6D6C;
    background-color: #FFF;
    border: 1px solid #EE5757;
  }
  &.color-gray {
    background-color: #999;
    color: #FFF;
  }
  &.color-orange {
    background: #FF7214;
    color: #FFF;
  }
  &.color-white-gray {
    background-color: #FFF;
    color: #999;
    border-color: #999;
  }
}

// btn 尺寸设定
button.save,
button.submit,
button.cancel,
button.unvarified,
button.varified,
span.modify {
  min-width: 2.75rem;
  padding: 0 1.41rem;
  font-size: 12px;
  line-height: 1.86rem;
  border-radius: 2px;
  box-sizing: border-box;
  border: 1px solid #EE5757;
  text-align: center;
  &.sm {
    line-height: 1.5;
    padding: 0 2px;
  }
  &.md {
    font-size: 16px;
    line-height: 1.875em;
  }
  // &.s:active {
  //     -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
  //     box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
  // }
}

// setting modal
.user-setting-modal {
  .modal-dialog {
    padding-top: 0;
    width: 502px;
  }
  // binduser, updateavatar, updatepwd
  .fa-modal.sm {
    .modal-dialog {
      width: 362px;
    }
  }
  // modal-content
  .modal-content {
    border-radius: 0;
    padding-bottom: 1px;
    .modal-header {
      padding: 20px 40px 10px;
      border-bottom: 0;
      text-align: center;
    }
    .modal-title {
      font-weight: 400;
      font-size: 20px;
      line-height: 1.8;
      text-align: center;
    }
    .modal-body {
      padding: 0 40px;
      // 基本信息，账户安全
      .module {
        padding-top: 20px;
        // detail-list
        ul.detail-list {
          padding-left: 0;
          list-style: none;
          margin-top: 20px;
          margin-bottom: 20px;
          // line
          li {
            padding: 3px 0.9375rem 12px 0.9375rem;
            display: table;
            box-siing: border-box;
            width: 100%;
            height: 39px;
            // 右边的2列
            .item-middle,
            .item-right {
              padding-left: 15px;
            }
            // line-item
            .line-item {
              color: #333;
              font-size: 13px;
              line-height: 1.4;
              display: table-cell;
              vertical-align: middle;
              white-space: nowrap;
              // label
              .item-label {
                width: 56px;
                text-align: justify;
                text-align-last: justify;
                display: inline-block;
              }
              // 修改按键
              span.modify {
                display: inline-block;
                cursor: pointer;
              }
              // 保存，取消
              .btn-container {
                button.save,
                button.cancel {
                  outline: 0;
                  // background-color: transparent;
                  border-color: #ddd;
                  vertical-align: top;
                }
                button.cancel {
                  margin-left: 10px;
                }
                .btn-lg {
                  width: 67.8%;
                }
                .btn-sm {
                  width: 28.5%;
                }
                .btn-lg:not(:first-child),
                .btn-sm:not(:first-child) {
                  margin-left: 3.57%;
                }
              }
            }
            // 中间的内容
            .item-middle {
              width: 100%;
              white-space: normal;
              word-break: break-all;
              input.cm-action {
                border: 0;
                background-color: transparent;
                outline: 0;
              }
              // gender selection
              .gender-selection {
                &:after {
                  content: '';
                  clear: both;
                  display: block;
                  height: 0;
                }
                .radio-item {
                  float: left;
                  input[type="radio"] {
                    margin-right: 10px;
                    -webkit-appearance: none;
                    display: inline-block;
                    margin-right: 3px;
                    width: 16px;
                    height: 16px;
                    border: 1px solid @theme-color;
                    outline: 0;
                    vertical-align: text-bottom;
                    border-radius: 50%;
                    padding: 3px;
                    background-clip: content-box;
                    &:checked {
                      background-color: @theme-color;
                    }
                  }
                  &:not(:last-child) {
                    margin-right: 28px;
                  }
                }
              }
              // date picker
              .datepicker table tr td.active.active,
              .datepicker table tr td.active.highlighted.active,
              .datepicker table tr td.active.highlighted:active,
              .datepicker table tr td.active.highlighted:hover,
              .datepicker table tr td.active:active,
              .datepicker table tr td.active:hover,
              .open>.dropdown-toggle.datepicker table tr td.active,
              .open>.dropdown-toggle.datepicker table tr td.active.highlighted {
                background-color: @theme-color;
                border-color: @theme-color;
                border-radius: 2px;
              }
            }
          }
        }
      }
      // updatepwd, binduser
      div.form-line {
        position: relative;
        margin-bottom: 20px;
        display: table;
        box-sizing: border-box;
        width: 100%;
        height: 39px;
        &:first-child {
          margin-top: 10px;
        }
        .left-icon {
          position: absolute;
          left: 0;
          width: 40px;
          height: 28px;
          line-height: 28px;
          font-size: 16px;
          color: #666;
          text-align: center;
        }
        input {
          width: 100%;
          line-height: 2em;
          padding-left: 40px;
          border-width: 0 0 1px 0;
          border-color: #CCC;
          border-style: solid;
          outline: 0;
          font-size: 16px;
        }
        .line-item {
          display: table-cell;
          vertical-align: middle;
          white-space: nowrap;
          &.item-left {
            width: 100%;
            white-space: normal;
            word-break: break-all;
          }
          &.item-right {
            button.fix-left {
              margin-left: 22px;
            }
          }
        }
      }
      // 头像, detail, updateavatar
      .avatar {
        background-position: center;
        background-repeat: no-repeat;
        background-size: cover;
        overflow: hidden;
        display: inline-block;
        width: 2.5rem;
        height: 2.5rem;
        vertical-align: middle;
        border-radius: 2px;
        &.lg {
          width: 80px;
          height: 80px;
        }
        &.md {
          width: 3.125rem;
          height: 3.125rem;
        }
        &.sm {
          width: 1.875rem;
          height: 1.875rem;
        }
        &.r {
          border-radius: 50%;
        }
        &.preview {
          width: 280px;
          height: 280px;
        }
        &.empty {
          border: 1px solid #EEE;
        }
      }
      // 头像上传，updateavatar
      .avatar.file {
        color: #999;
        text-align: center;
        border: 1px solid #ccc;
        border-radius: 2px;
        i {
          line-height: 280px;
          font-size: 160px;
          opacity: .2;
          cursor: pointer;
        }
        &:hover i {
          opacity: .6;
        }
        &.active i {
          opacity: 0;
        }
        .file {
          min-height: 2.75rem;
          min-width: 2.75rem;
          box-sizing: border-box;
          line-height: 2.75rem;
          display: inline-block;
          cursor: pointer;
          position: relative;
          input[type="file"] {
            width: 100%;
            height: 100%;
            position: absolute;
            opacity: 0;
            top: 0;
            left: 0;
          }
          input[type="file"]::-webkit-file-upload-button {
            cursor: pointer;
          }
        }
      }
      // 错误消息提醒，updateavatar, updatepwd, binduser
      p.err-msg {
        min-height: 17px;
        margin-left: 40px;
        margin: 0;
        font-size: 12px;
        color: #FF6D6C;
        white-space: nowrap;
      }
    }
    // footer
    .modal-footer {
      border-top: 0;
      padding: 10px 40px 20px;
      // 确定，取消
      .btn-container {
        button {
          outline: 0;
          border-color: #DDD;
          vertical-align: top;
        }
        .btn-lg {
          width: 65%;
        }
        .btn-sm {
          width: 30%;
        }
        .btn-lg:not(:first-child),
        .btn-sm:not(:first-child) {
          margin-left: 3%;
        }
      }
    }
  }
}